package router

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/router"

	"vrcm/src/vrcm/app/admin/apis/comment"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerCommentRouter)
}

// registerCommentRouter
func registerCommentRouter(v1 *gin.RouterGroup) {
	api := apis.Comment{}
	r := v1.Group("/comment")
	{
		r.POST("/get-list", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("/insert", api.Insert)
		//r.POST("/get-all-reviews", api.GetAllReviews)
		r.DELETE("", api.Delete)
		r.POST("/review", api.Review)
		r.POST("/get-validate-comments", api.GetValidateComments)
		r.POST("/get-replies", api.GetReplies)
		r.POST("/get-comment-list", api.GetCommentList)
		r.POST("/delete-comment", api.DeleteComment)
	}
}
